package controllers;

import java.util.List;

import net.sf.oval.constraint.Size;

import com.sun.org.apache.xml.internal.security.Init;

import models.Product;
import models.SaleOrder;
import models.SaleOrderItem;


import play.mvc.Controller;

public class SaleOrders extends Controller{
	
	public static void saleOrder(){
		SaleOrder saleOrder = new SaleOrder() ;
		saleOrder.setSaleorderno(SaleOrder.generateOrderno());
		System.out.println(saleOrder.getSaleorderno());
		render(saleOrder);
	}
	
	public static void saveSaleOrder(SaleOrder sa){
		sa.save();
		renderJSON(sa.id);
	}
	
	public static void saveSaleItems(SaleOrderItem soi){
		soi.save();
	}
	
	
}
